<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:f="http://java.sun.com/jsf/core">


<ui:composition template="/template/common/commonLayout.xhtml">

	<ui:define name="content">



		<f:view>
			<center>




				<rich:panel id="panelIngreso">
					<h:form>
						<a4j:region>

							<f:facet name="header">
								<h:outputText value="Valida Poder" />
							</f:facet>
							<table>
								<tr>
									<td>RUC:</td>
									<td><h:inputText value="#{poderAction.ruc}"
											required="true" id="ruc"
											requiredMessage=" Debe ingresar ruc a consultar"
											maxlength="11">

											<f:validateLength minimum="11" maximum="11" />

										</h:inputText></td>








								</tr>
								<tr>
									<td>DNI:</td>
									<td><h:inputText value="#{poderAction.dni}"
											required="true" id="dni"
											requiredMessage=" Debe ingresar el DNI" maxlength="8">

											<f:validateLength minimum="8" maximum="8" />


										</h:inputText>
									</td>

								</tr>

								<tr>
									<td>Tipo:</td>
									<td><h:inputText value="#{poderAction.codigoPoder}"
											required="true" id="codigoPoder"
											requiredMessage=" Debe ingresar el cogigo del poder">
											<f:validateLength minimum="4" maximum="4" />
										</h:inputText></td>



								</tr>

								<tr>
									<td>Importe:</td>
									<td><h:inputText value="#{poderAction.importe}"
											required="true" id="importe"
											requiredMessage=" Debe ingresar el importe">

										</h:inputText></td>



								</tr>

								<tr>
									<td colspan="3"><a4j:commandButton value="Valida Poder"
											id="botonValidaPoder"
											actionListener="#{poderAction.validaPoder}"
											reRender="botonValidaPoder,mensajeValidacion" />
									</td>
								</tr>


							</table>


							<table align="center">
								<tr>
									<td align="left"><rich:messages layout="list">
											<f:facet name="errorMarker">
												<h:graphicImage value="/images/error.gif" />
											</f:facet>

											<f:facet name="infoMarker">
												<h:graphicImage value="/images/info.jpeg" />
											</f:facet>
										</rich:messages></td>
								</tr>
							</table>


							<h:outputText value="#{poderAction.mensajeValidacion}"
								id="mensajeValidacion" />





						</a4j:region>
					</h:form>


					<h:form>
						<a4j:commandButton value="Volver"
							action="#{poderAction.muestraListado}" />
					</h:form>
				</rich:panel>






			</center>





		</f:view>

	</ui:define>

</ui:composition>



</html>

